package com.lwf.run;

import com.lwf.core.processor.HandlerPageProcessor;
import com.lwf.component.spider.iteye.boke.IteyeBokeetailHandler;
import com.lwf.component.spider.iteye.boke.IteyeBokeetailListHandler;
import us.codecraft.webmagic.Site;
import us.codecraft.webmagic.Spider;

public class IteyeBoKeRun {

    public static void main(String[] args) {

        Site site = Site.me().setRetryTimes(3).setSleepTime(1000);

        Spider.create(new HandlerPageProcessor(site, new IteyeBokeetailListHandler(), new IteyeBokeetailHandler()))
                .addUrl("http://www.iteye.com/blogs?page=1")
                //开启5个线程抓取
                .thread(1)
                //启动爬虫
                .run();
    }

}
